package com.zx.callback.common.enums;

/**
 * @author ：yanst
 * @since: 2017/11/8
 * @history：(date editor desc)
 */
public enum UsedStateEnum {
    UNUSED((byte)0,"未使用"),
    ALREADY_USED((byte)1,"已使用"),

            ;
    UsedStateEnum(byte key, String value) {
        this.key = key;
        this.value = value;
    }

    public static boolean contains(Byte key) {
        if (key != null) {
            for (UsedStateEnum e : UsedStateEnum.values()) {
                if (e.getKey().byteValue() == key) {
                    return true;
                }
            }
        }
        return false;
    }

    private Byte key;

    private String value;

    public Byte getKey() {
        return key;
    }

    public void setKey(Byte key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
